package com.esl.dto.admin;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Set;
import com.esl.model.admin.Project;
import com.esl.model.admin.User;

public class Project_Dto {
	private String title; 
	private String content;
	private String keytech;
	private String picurl;
	private String state;
	private String year;
	private String month;
	private String day;
	private Date time;
	private int kind;
	private String detail;
	private String users;

	public Project toProject(Set<User> users) {
		try {
			time = new SimpleDateFormat("yyyy-MM-dd").parse(year + "-" + month
					+ "-" + day);
		} catch (ParseException e) {
			e.printStackTrace();
		}
		System.out.println("time:" + time);
		return new Project(title, content, keytech, picurl, state, time, kind,
				detail, users);
	}

	/*-------------------------------------------*/
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getKeytech() {
		return keytech;
	}

	public void setKeytech(String keytech) {
		this.keytech = keytech;
	}

	public String getPicurl() {
		return picurl;
	}

	public void setPicurl(String picurl) {
		this.picurl = picurl;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getYear() {
		return year;
	}

	public void setYear(String year) {
		this.year = year;
	}

	public String getMonth() {
		return month;
	}

	public void setMonth(String month) {
		this.month = month;
	}

	public String getDay() {
		return day;
	}

	public void setDay(String day) {
		this.day = day;
	}

	public int getKind() {
		return kind;
	}

	public void setKind(int kind) {
		this.kind = kind;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public String getUsers() {
		return users;
	}

	public void setUsers(String users) {
		this.users = users;
	}

}
